﻿using MaiPlanServer.Model;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace MaiPlanServer.IServices.IQualityServices
{
    public interface IDetectionSettingsServices
    {
        /// <summary>
        /// 分页获取数据
        /// </summary>
        /// <param name="PageIndex">当前页数</param>
        /// <param name="PageSize">每页显示条数</param>
        /// <param name="Code">检测项编码</param>
        /// <param name="Name">检测项名称</param>
        /// <param name="Type">检测项类型</param>
        /// <returns></returns>
        public  Task<IEnumerable<qc_index>> GetJsonAsync(int PageIndex,int PageSize,string Code,string Name,string Type);
        /// <summary>
        /// 获取数据条数
        /// </summary>
        /// <param name="Code">检测项编码</param>
        /// <param name="Name">检测项名称</param>
        /// <param name="Type">检测项类型</param>
        /// <returns></returns>
        public Task<int> GetCountAsync(string Code,string Name, string Type);

        /// <summary>
        /// 删除单条数据
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        public Task<bool> DelAsync(string Id);

        /// <summary>
        /// 删除多条数据
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        public Task<bool> DelAsync(string[] Id);

        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public Task<bool> AddAsync(qc_index model);

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public Task<bool> UpdateAsync(qc_index model);
    }
}
